﻿
Partial Class driver_portal
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load

        'Response.Write(Session("semester"))

        Try
            Dim sql As String
            'sql = "select * from Event where DriverID=" & Session("driver_id") & " and Date > '" & DateTime.Today() & "' order by Date"
            'sql = "select Event.[id],Event.[ServiceID],Event.[DriverID],Event.[VehicleID],Event.[Notes],Event.[Date],Event.[DefaultDriverID],COMSERV_ACTIVITY.[activity-name],COMSERV_ACTIVITY.[activityid],Vehicle.[Name],Vehicle.[id] from Event,COMSERV_ACTIVITY,Vehicle where [ServiceID]=COMSERV_ACTIVITY.[activityid] and Vehicle.[id]=Event.[VehicleID] and DriverID=" & Session("driver_id") & " and Date > '" & DateTime.Today() & "' order by Date"
            sql = "SELECT [activity-name], [Date], [Notes], [begin_time], [end_time], [travel_time] from Event INNER JOIN COMSERV_ACTIVITY ON Event.ServiceID = COMSERV_ACTIVITY.activityid where Event.DriverID =" & Session("Driver_id") & " and [Date] >= GETDATE() Order By [Date] Asc"
            SqlDataSource1.SelectCommand = sql

            'Response.Write(sql)
        Catch ex As Exception
            'Response.Write(ex)
        End Try

    End Sub
End Class
